import threading
import time

from bilibili import start, set_room
from ws_server import ws_open_server


if __name__ == '__main__':

    print('请输入房间名')
    room = input()
    set_room(room)
    # 创建一个线程来执行 WebSocket 通信
    websocket_thread = threading.Thread(target=ws_open_server)

    # 启动线程
    websocket_thread.start()

    start()

    while True:
        time.sleep(1.0)
